<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>echarts常用图表 | html5中文文档</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    
    <link rel="prev" href="../../md/echarts/lesson3.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="2.3"
        data-chapter-title="echarts常用图表"
        data-filepath="md/echarts/lesson4.md"
        data-basepath="../.."
        data-revision="Fri Dec 14 2018 11:56:27 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="md/html/html.html">
            
                
                    <a href="../../md/html/html.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        html5的介绍
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="md/html/hbuilder的使用.html">
            
                
                    <a href="../../md/html/hbuilder的使用.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        开发工具的使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="md/html/lesson0.html">
            
                
                    <a href="../../md/html/lesson0.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        html5的介绍和结构分析
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="md/html/lesson1.html">
            
                
                    <a href="../../md/html/lesson1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        常用标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="md/html/lesson2.html">
            
                
                    <a href="../../md/html/lesson2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        图片音频视频
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="md/html/lesson3.html">
            
                
                    <a href="../../md/html/lesson3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        列表表格
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="md/html/lesson4.html">
            
                
                    <a href="../../md/html/lesson4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        表单元素
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="md/html/lesson5.html">
            
                
                    <a href="../../md/html/lesson5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.7.</b>
                        
                        h5新增特性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="md/html/lesson6.html">
            
                
                    <a href="../../md/html/lesson6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.8.</b>
                        
                        h5新增特性
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="md/html/lesson7.html">
            
                
                    <a href="../../md/html/lesson7.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.9.</b>
                        
                        h5新增特性
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="md/echarts/lesson1.html">
            
                
                    <a href="../../md/echarts/lesson1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        echarts的介绍
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="md/echarts/lesson2.html">
            
                
                    <a href="../../md/echarts/lesson2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        echarts快速上手
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="md/echarts/lesson3.html">
            
                
                    <a href="../../md/echarts/lesson3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        echarts常用组件
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="2.3" data-path="md/echarts/lesson4.html">
            
                
                    <a href="../../md/echarts/lesson4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        echarts常用图表
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >html5中文文档</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="&#x5176;&#x4ED6;&#x5E38;&#x7528;&#x56FE;&#x8868;">&#x5176;&#x4ED6;&#x5E38;&#x7528;&#x56FE;&#x8868;</h1>
<h2 id="&#x4E00;&#x3001;&#x6298;&#x7EBF;&#x56FE;">&#x4E00;&#x3001;&#x6298;&#x7EBF;&#x56FE;</h2>
<p>&#x5B9E;&#x4F8B;&#xFF1A;</p>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> option = {
    title:{
        text:<span class="hljs-string">&quot;2017&#x5E74;&#x67D0;&#x67D0;&#x7EDF;&#x8BA1;&quot;</span>,
        subtext:<span class="hljs-string">&quot;&#x672C;&#x6570;&#x636E;&#x7EAF;&#x5C5E;&#x865A;&#x6784;&quot;</span>
    },
    toolbox:{<span class="hljs-comment">//&#x5DE5;&#x5177;&#x7BB1;</span>
        feature:{<span class="hljs-comment">//&#x5B9A;&#x4E49;&#x6240;&#x9700;&#x8981;&#x7528;&#x5230;&#x7684;&#x529F;&#x80FD;</span>
            dataView:{<span class="hljs-comment">//&#x6570;&#x636E;&#x89C6;&#x56FE;</span>
                show:<span class="hljs-literal">true</span>
            },
            restore:{<span class="hljs-comment">//&#x8FD8;&#x539F;</span>
                show:<span class="hljs-literal">true</span>
            },
            dataZoom:{<span class="hljs-comment">//&#x533A;&#x57DF;&#x653E;&#x5927;&#x7F29;&#x5C0F;</span>
                show:<span class="hljs-literal">true</span>
            },
            saveAsImage:{<span class="hljs-comment">//&#x4FDD;&#x5B58;&#x56FE;&#x7247;</span>
                show:<span class="hljs-literal">true</span>
            },
            magicType:{<span class="hljs-comment">//&#x5207;&#x6362;&#x56FE;&#x5F62;&#x7C7B;&#x578B;</span>
                type:[<span class="hljs-string">&apos;line&apos;</span>,<span class="hljs-string">&apos;bar&apos;</span>]
            }
        }
    },
    tooltip:{
        trigger:<span class="hljs-string">&apos;axis&apos;</span>,
        backgroundColor:<span class="hljs-string">&apos;rgba(0,0,255,0.3)&apos;</span>
    },
    legend:{
        data:[<span class="hljs-string">&apos;&#x9500;&#x91CF;&apos;</span>]
    },
    xAxis:{
        data:[<span class="hljs-string">&apos;&#x5C0F;&#x7C73;&apos;</span>,<span class="hljs-string">&apos;&#x5927;&#x7C73;&apos;</span>,<span class="hljs-string">&apos;&#x9ED1;&#x7C73;&apos;</span>,<span class="hljs-string">&apos;&#x7EA2;&#x7C73;&apos;</span>,<span class="hljs-string">&apos;&#x9EC4;&#x7C73;&apos;</span>]
    },
    yAxis:{},
    series:[
        {
            name:<span class="hljs-string">&quot;&#x9500;&#x91CF;&quot;</span>,
            type:<span class="hljs-string">&quot;line&quot;</span>,<span class="hljs-comment">//&#x5B9A;&#x4E49;&#x6298;&#x7EBF;&#x56FE;</span>
            data:[<span class="hljs-number">3</span>,<span class="hljs-number">15</span>,<span class="hljs-number">35</span>,<span class="hljs-number">12</span>,<span class="hljs-number">55</span>],
            markPoint:{
                data:[
                    {type:<span class="hljs-string">&quot;max&quot;</span>,name:<span class="hljs-string">&quot;&#x6700;&#x5927;&#x503C;&quot;</span>,symbol:<span class="hljs-string">&quot;triangle&quot;</span>},
                    {type:<span class="hljs-string">&quot;min&quot;</span>,name:<span class="hljs-string">&quot;&#x6700;&#x5C0F;&#x503C;&quot;</span>}
                ]
            },
            markLine:{
                data:[
                    {type:<span class="hljs-string">&quot;average&quot;</span>,name:<span class="hljs-string">&quot;&#x5E73;&#x5747;&#x503C;&quot;</span>}
                ]
            }
        }
    ]
}

&#x5C5E;&#x6027;&#x8BF4;&#x660E;&#xFF1A;

    markPoint&#xFF1A;&#x6307;&#x5B9A;&#x56FE;&#x8868;&#x7684;&#x6700;&#x5927;&#x6700;&#x5C0F;&#x503C;
        symbol&#xFF1A;&#x6307;&#x5B9A;&#x6700;&#x5927;&#x503C;&#x7684;&#x6807;&#x8BB0;&#x56FE;&#x6807;
    markLine&#xFF1A;&#x663E;&#x793A;&#x56FE;&#x8868;&#x6570;&#x636E;&#x7684;&#x5E73;&#x5747;&#x503C;
</code></pre>
<p><a href="case/2.html" target="_blank">&#x70B9;&#x6211;&#x67E5;&#x770B;&#x6548;&#x679C;</a></p>
<h2 id="&#x4E8C;&#x3001;&#x997C;&#x56FE;">&#x4E8C;&#x3001;&#x997C;&#x56FE;</h2>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> option = {
    title:{
        text:<span class="hljs-string">&quot;&#x67D0;&#x7AD9;&#x70B9;&#x7528;&#x6237;&#x8BBF;&#x95EE;&#x6765;&#x6E90;&quot;</span>,
        subtext:<span class="hljs-string">&quot;&#x7EAF;&#x5C5E;&#x865A;&#x6784;&quot;</span>,
        x:<span class="hljs-string">&quot;center&quot;</span>
    },
    tooltip:{
        trigger:<span class="hljs-string">&quot;item&quot;</span>,<span class="hljs-comment">//&#x6570;&#x636E;&#x9879;&#x56FE;&#x5F62;&#x89E6;&#x53D1;&#xFF0C;&#x4E3B;&#x8981;&#x5728;&#x6563;&#x70B9;&#x56FE;&#xFF0C;&#x997C;&#x56FE;&#x7B49;&#x65E0;&#x7C7B;&#x76EE;&#x8F74;&#x7684;&#x56FE;&#x8868;&#x4E2D;&#x4F7F;&#x7528;&#x3002;</span>
        <span class="hljs-comment">//&#x5F39;&#x7A97;&#x5185;&#x5BB9;&#x6837;&#x5F0F;&#xFF0C;{a}&#x8868;&#x793A;&#x7CFB;&#x5217;&#x540D;&#x79F0;&lt;br/&gt;&#x6362;&#x884C;&#xFF0C;{b}:{c}&#x7CFB;&#x5217;&#x540D;&#x79F0;&#xFF1A;&#x6570;&#x503C;&#xFF0C;({d}%)&#x7CFB;&#x5217;&#x6240;&#x5360;&#x6BD4;&#x4F8B;</span>
        formatter:<span class="hljs-string">&quot;{a}&lt;br/&gt;{b}:{c} ({d}%)&quot;</span>
    },
    legend:{
        orient:<span class="hljs-string">&quot;vertical&quot;</span>,
        left:<span class="hljs-string">&quot;left&quot;</span>,
        data:[<span class="hljs-string">&apos;&#x76F4;&#x63A5;&#x8BBF;&#x95EE;&apos;</span>,<span class="hljs-string">&apos;&#x90AE;&#x4EF6;&#x8425;&#x9500;&apos;</span>,<span class="hljs-string">&apos;&#x8054;&#x76DF;&#x5E7F;&#x544A;&apos;</span>,<span class="hljs-string">&apos;&#x89C6;&#x9891;&#x5E7F;&#x544A;&apos;</span>,<span class="hljs-string">&apos;&#x641C;&#x7D22;&#x5F15;&#x64CE;&apos;</span>,<span class="hljs-string">&apos;&#x76F4;&#x63A5;&#x8BBF;&#x95EE;1&apos;</span>,<span class="hljs-string">&apos;&#x90AE;&#x4EF6;&#x8425;&#x9500;1&apos;</span>,<span class="hljs-string">&apos;&#x8054;&#x76DF;&#x5E7F;&#x544A;1&apos;</span>,<span class="hljs-string">&apos;&#x89C6;&#x9891;&#x5E7F;&#x544A;1&apos;</span>,<span class="hljs-string">&apos;&#x641C;&#x7D22;&#x5F15;&#x64CE;1&apos;</span>]
    },
    series:[
        {
            name:<span class="hljs-string">&quot;&#x8BBF;&#x95EE;&#x6765;&#x6E90;&quot;</span>,
            type:<span class="hljs-string">&apos;pie&apos;</span>,        <span class="hljs-comment">//&#x997C;&#x72B6;&#x56FE;</span>
            radius:<span class="hljs-string">&quot;55%&quot;</span>,    <span class="hljs-comment">//&#x534A;&#x5F84;</span>
            center:[<span class="hljs-string">&apos;50%&apos;</span>,<span class="hljs-string">&apos;60%&apos;</span>],<span class="hljs-comment">//&#x5706;&#x5FC3;&#x4F4D;&#x7F6E;</span>
            data:[
                {value:<span class="hljs-number">335</span>,name:<span class="hljs-string">&quot;&#x76F4;&#x63A5;&#x8BBF;&#x95EE;&quot;</span>},
                {value:<span class="hljs-number">310</span>,name:<span class="hljs-string">&quot;&#x90AE;&#x4EF6;&#x8425;&#x9500;&quot;</span>},
                {value:<span class="hljs-number">234</span>,name:<span class="hljs-string">&quot;&#x8054;&#x76DF;&#x5E7F;&#x544A;&quot;</span>},
                {value:<span class="hljs-number">135</span>,name:<span class="hljs-string">&quot;&#x89C6;&#x9891;&#x5E7F;&#x544A;&quot;</span>},
                {value:<span class="hljs-number">1548</span>,name:<span class="hljs-string">&quot;&#x641C;&#x7D22;&#x5F15;&#x64CE;&quot;</span>}
            ]
        }
    ]
}
</code></pre>
<p><a href="case/3.html" target="_blank">&#x70B9;&#x6211;&#x67E5;&#x770B;&#x6548;&#x679C;</a></p>
<h2 id="&#x4E09;&#x3001;&#x4EEA;&#x76D8;&#x8868;">&#x4E09;&#x3001;&#x4EEA;&#x76D8;&#x8868;</h2>
<pre><code class="lang-js"><span class="hljs-comment">//&#x6307;&#x5B9A;&#x56FE;&#x8868;&#x7684;&#x914D;&#x7F6E;&#x9879;&#x548C;&#x6570;&#x636E;</span>
<span class="hljs-keyword">var</span> option = {
    tooltip:{
        formatter:<span class="hljs-string">&quot;{a}&lt;br/&gt;{b}:{c}%&quot;</span>
    },
    toolbox:{
        feature:{
            restore:{},
            saveAsImage:{}
        }
    },
    series:[
        {
            name:<span class="hljs-string">&quot;&#x4E1A;&#x52A1;&#x6307;&#x6807;&quot;</span>,
            type:<span class="hljs-string">&apos;gauge&apos;</span>,
            detail:{formatter:<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params">params</span>)</span>{
                <span class="hljs-built_in">console</span>.log(params);
                <span class="hljs-keyword">return</span> params
            }},
            data:[{value:<span class="hljs-number">32</span>,name:<span class="hljs-string">&quot;&#x5B8C;&#x6210;&#x7387;&quot;</span>}]
        }
    ]
}

<span class="hljs-comment">//&#x52A8;&#x6001;&#x4FEE;&#x6539;&#x6570;&#x636E;&#x6307;&#x6807;&#x7684;&#x503C;</span>
setInterval(<span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>)</span>{
    option.series[<span class="hljs-number">0</span>].data[<span class="hljs-number">0</span>].value = (<span class="hljs-built_in">Math</span>.random()*<span class="hljs-number">100</span>).toFixed(<span class="hljs-number">2</span>)-<span class="hljs-number">1</span>;
    myChart.setOption(option);
},<span class="hljs-number">2000</span>)
</code></pre>
<p><a href="case/4.html" target="_blank">&#x70B9;&#x6211;&#x67E5;&#x770B;&#x6548;&#x679C;</a></p>
<h2 id="&#x56DB;&#x3001;k&#x7EBF;&#x56FE;">&#x56DB;&#x3001;K&#x7EBF;&#x56FE;</h2>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> option = {
    tooltip:{},
    xAxis:{
        data:[<span class="hljs-string">&apos;2017-10-24&apos;</span>, <span class="hljs-string">&apos;2017-10-25&apos;</span>, <span class="hljs-string">&apos;2017-10-26&apos;</span>, <span class="hljs-string">&apos;2017-10-27&apos;</span>]
    },
    yAxis:{},
    series:[{
        type:<span class="hljs-string">&apos;k&apos;</span>,<span class="hljs-comment">//&#x5373;candlestick&#xFF0C;&apos;k&apos; &#x4F1A;&#x88AB;&#x81EA;&#x52A8;&#x8F6C;&#x4E3A; &apos;candlestick&apos;</span>
        data:[
            [<span class="hljs-number">20</span>, <span class="hljs-number">30</span>, <span class="hljs-number">10</span>, <span class="hljs-number">35</span>],<span class="hljs-comment">//&#x5F00;&#x76D8;&#xFF0C;&#x6536;&#x76D8;&#xFF0C;&#x6700;&#x4F4E;&#xFF0C;&#x6700;&#x9AD8;</span>
            [<span class="hljs-number">40</span>, <span class="hljs-number">35</span>, <span class="hljs-number">30</span>, <span class="hljs-number">55</span>],
            [<span class="hljs-number">33</span>, <span class="hljs-number">38</span>, <span class="hljs-number">33</span>, <span class="hljs-number">40</span>],
            [<span class="hljs-number">40</span>, <span class="hljs-number">40</span>, <span class="hljs-number">32</span>, <span class="hljs-number">42</span>]
        ]
    }]
}
</code></pre>
<p><a href="case/5.html" target="_blank">&#x70B9;&#x6211;&#x67E5;&#x770B;&#x6548;&#x679C;</a></p>
<h2 id="&#x4E94;&#x3001;&#x591A;&#x56FE;&#x8054;&#x52A8;">&#x4E94;&#x3001;&#x591A;&#x56FE;&#x8054;&#x52A8;</h2>
<pre><code class="lang-js"><span class="hljs-keyword">var</span> chart1 = echarts.init(<span class="hljs-built_in">document</span>.querySelector(<span class="hljs-string">&quot;#main1&quot;</span>));
<span class="hljs-keyword">var</span> chart2 = echarts.init(<span class="hljs-built_in">document</span>.querySelector(<span class="hljs-string">&quot;#main2&quot;</span>));
<span class="hljs-keyword">var</span> option1 = {
    title:{
        text:<span class="hljs-string">&quot;&#x6A21;&#x62DF;&#x6570;&#x636E;&quot;</span>
    },
    tooltip:{},
    toolbox:{
        feature:{
            dataView:{
                show:<span class="hljs-literal">true</span>
            },
            restore:{
                show:<span class="hljs-literal">true</span>
            },
            dataZoom:{
                show:<span class="hljs-literal">true</span>
            },
            saveAsImage:{
                show:<span class="hljs-literal">true</span>
            },
            magicType:{
                type:[<span class="hljs-string">&apos;line&apos;</span>,<span class="hljs-string">&quot;bar&quot;</span>]
            }
        }
    },
    legend:{
        data:[<span class="hljs-string">&quot;&#x9500;&#x91CF;&quot;</span>]
    },
    xAxis:{
        data:[<span class="hljs-string">&apos;&#x6BDB;&#x7B14;&apos;</span>,<span class="hljs-string">&apos;&#x94A2;&#x7B14;&apos;</span>,<span class="hljs-string">&apos;&#x94C5;&#x7B14;&apos;</span>,<span class="hljs-string">&apos;&#x5706;&#x73E0;&#x7B14;&apos;</span>,<span class="hljs-string">&apos;&#x7B7E;&#x5B57;&#x7B14;&apos;</span>]
    },
    yAxis:{},
    series:[{
        name:<span class="hljs-string">&quot;&#x9500;&#x91CF;&quot;</span>,
        type:<span class="hljs-string">&quot;line&quot;</span>,
        data:[<span class="hljs-number">20</span>,<span class="hljs-number">5</span>,<span class="hljs-number">12</span>,<span class="hljs-number">8</span>,<span class="hljs-number">50</span>]
    }]
}
<span class="hljs-keyword">var</span> option2 = {
    title:{
        text:<span class="hljs-string">&quot;&#x6A21;&#x62DF;&#x6570;&#x636E;&quot;</span>
    },
    tooltip:{},
    toolbox:{
        feature:{
            dataView:{
                show:<span class="hljs-literal">true</span>
            },
            restore:{
                show:<span class="hljs-literal">true</span>
            },
            dataZoom:{
                show:<span class="hljs-literal">true</span>
            },
            saveAsImage:{
                show:<span class="hljs-literal">true</span>
            },
            magicType:{
                type:[<span class="hljs-string">&apos;line&apos;</span>,<span class="hljs-string">&quot;bar&quot;</span>]
            }
        }
    },
    legend:{
        data:[<span class="hljs-string">&quot;&#x9500;&#x91CF;&quot;</span>]
    },
    xAxis:{
        data:[<span class="hljs-string">&apos;&#x6BDB;&#x7B14;&apos;</span>,<span class="hljs-string">&apos;&#x94A2;&#x7B14;&apos;</span>,<span class="hljs-string">&apos;&#x94C5;&#x7B14;&apos;</span>,<span class="hljs-string">&apos;&#x5706;&#x73E0;&#x7B14;&apos;</span>,<span class="hljs-string">&apos;&#x7B7E;&#x5B57;&#x7B14;&apos;</span>]
    },
    yAxis:{},
    series:[{
        name:<span class="hljs-string">&quot;&#x9500;&#x91CF;&quot;</span>,
        type:<span class="hljs-string">&quot;bar&quot;</span>,
        data:[<span class="hljs-number">20</span>,<span class="hljs-number">5</span>,<span class="hljs-number">12</span>,<span class="hljs-number">8</span>,<span class="hljs-number">50</span>]
    }]
}
chart1.setOption(option1);
chart2.setOption(option2);
<span class="hljs-comment">//&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x4F20;&#x5165;&#x9700;&#x8981;&#x8054;&#x52A8;&#x7684;&#x5B9E;&#x4F8B;&#x6570;&#x7EC4;</span>
echarts.connect([chart1, chart2]);
</code></pre>
<p><a href="case/6.html" target="_blank">&#x70B9;&#x6211;&#x67E5;&#x770B;&#x6548;&#x679C;</a></p>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../md/echarts/lesson3.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page: echarts常用组件"><i class="fa fa-angle-left"></i></a>
        
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
